package com.zlf.sb.demo.service.impl;

import com.zlf.sb.demo.design.chain.ChainBizMarkEnum;
import com.zlf.sb.demo.design.chain.MerchantAdminChainContext;
import com.zlf.sb.demo.vo.ProductUpShelfReqDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class ProductServiceImpl {
    private final MerchantAdminChainContext<ProductUpShelfReqDTO> merchantAdminChainContext;

    public void upShelfProduct(ProductUpShelfReqDTO requestParam) {
        // 调用责任链进行校验
        merchantAdminChainContext.handler(
                ChainBizMarkEnum.MERCHANT_ADMIN_PRODUCT_UPSHELF_KEY.name(),
                requestParam
        );
        System.out.println("商品上架逻辑开始执行...");
        // 后续的商品上架业务逻辑
    }
}